package com.neuedu.guide;

/**
 * 赋值运算
 */
public class OperationAssignment {

    public static void main(String[] args) {




        //1 声明
        int numa;


        //变量在使用之前必须初始化，此句话报错
        // System.out.println(numa + 100);


        //2 赋值的过程
        numa = 35;

        //进行初始化之后不报错
        System.out.println(numa + 100);

        //初始化一个变量
        int numb = 100;


        // 先运算  等号 右侧的  表达式
        int numc = numa + numb;

        System.out.println("numc = " + numc);
        numc++;  // numc = 136    //  numc = numc + 1;

        numc += 3;  // numc = numc + 3
        System.out.println("numc = " + numc);


        numc -=5;
        System.out.println("numc -=5 : " + numc);

        numc *=5;
        System.out.println("numc *=5 : " + numc);


        numc /=5;
        System.out.println("numc /=5 : " + numc);


        numc %=5;
        System.out.println("numc %=5 : " + numc);














    }








}
